export namespace collectionRes {
  export interface User {
    id: number
    name: string
    mail: string
    phone: string
    wechat: string
    qq: string
    role: string
    createTime: Date
    updateTime: Date
  }

  export interface Product {
    id: number
    userId: number
    categoryId: number
    name: string
    description: string
    oldPrice: string
    newPrice: string
    imgList: string[]
    createTime: Date
    updateTime: Date
    user: User
  }

  export interface Collection {
    id: number
    userId: number
    productId: number
    createTime: Date
    updateTime: Date
    product: Product
  }

  export interface Data {
    collections: Collection[]
    totalCount: number
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}

export namespace checkCollectonRes {
  export interface Data {
    isCollection: boolean
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}

export namespace addCollectionRes {
  export interface Data {
    productId: number
    userId: number
    permission: number
    id: number
    createTime: Date
    updateTime: Date
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}
